#version 450

layout(location = 0) in vec4 fragColor;
layout(location = 1) flat in vec2 center;
layout(location = 2) flat in float circleRadius;
layout(location = 3) flat in float lineThickness;

layout(location = 0) out vec4 outColor;

void main() {
	float dist = distance(gl_FragCoord.xy, center);
	if (dist > circleRadius)
		discard;
	if (lineThickness > 0.0) {
		float width = circleRadius - lineThickness;
		if (dist < width)
			discard;
	}
	outColor = fragColor;
}